package com.itheima.filter;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;
import java.util.logging.Filter;
/*
过滤器处理类
必须实现Filter接口
 */
@WebFilter("/*")
public abstract class UserFilter implements Filter {
   /*
   执行过滤的方法
    */
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws ServletException, IOException {
        System.out.println("执行filter");
        //放行
        filterChain.doFilter(servletRequest,servletResponse);
    }
}
